package com.simple.redissonrpc.core;

import java.lang.reflect.Method;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class RpcCmdExecutor {

    private Method method;

    private Object handler;

    public RpcCmdExecutor(Method method, Object handler) {
        this.method = method;
        this.handler = handler;
    }

    public Method getMethod() {
        return method;
    }

    public Object getHandler() {
        return handler;
    }

    public void invoke(GameRpcMsgContext param) throws Exception {
        method.invoke(handler, param);
    }

}
